﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bluyel.Core
{   
    /// <summary>
    /// The base class of all value: string, int, double,...
    /// </summary>
    public abstract class ValueBase : IValue
    {
        /// <summary>
        /// The type of the data value.
        /// </summary>
        //public DataValueType DataValueType { get; protected set; }

        protected bool _isNullable = false;

        protected bool _isNull = false;

        /// <summary>
        /// true if the value of the data value can be null.
        /// </summary>
        public bool IsNullable
        {
            get { return _isNullable; }

            // todo: compliqué de changer en  cours de route!
            //set { if(!value)
            //    _isNull=fa
        }

        /// <summary>
        /// true if the value of the data value is null.
        /// can be null if IsNullable=true
        /// </summary>
        public bool IsNull
        {
            get { return _isNull; }
            set { _isNull = value; }
        }

        public abstract bool IsEqualsTo(IValue dv);
    }
}
